package com.rbac.web;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author gengaoliu
 */
@SpringBootApplication
@OpenAPIDefinition(
    info = @Info(title = "秘密小分队API技术文档", version = "1.0.0-SNAPSHOT"),
    security = @SecurityRequirement(name = "TOKEN"))
@SecurityScheme(
    type = SecuritySchemeType.APIKEY,
    name = "TOKEN",
    paramName = "Authorization",
    in = SecuritySchemeIn.HEADER
)
@EnableTransactionManagement
@EnableDiscoveryClient
public class StartApplication {
  public static void main(String[] args) {
    SpringApplication.run(StartApplication.class, args);
  }
}
